package com.intelligent.eayon.message;

import com.intelligent.eayon.utils.ByteUtils;
import com.intelligent.ispc.common.dto.AbstractValueObject;

public class Response extends AbstractValueObject {

    private byte[] code = new byte[4];
    private byte[] atlg = new byte[4];
    private byte[] errc = new byte[4];
    private byte[] attr;

    public byte[] getCode() {
        return code;
    }

    public void setCode(byte[] code) {
        this.code = code;
    }

    public byte[] getAtlg() {
        return atlg;
    }

    public void setAtlg(byte[] atlg) {
        this.atlg = atlg;
    }

    public byte[] getErrc() {
        return errc;
    }

    public void setErrc(byte[] errc) {
        this.errc = errc;
    }

    public byte[] getAttr() {
        return attr;
    }

    public void setAttr(byte[] attr) {
        this.attr = attr;
    }

    /**
     * length
     * @return
     */
    public int length() {
        return 12 + ByteUtils.bytes2int(atlg);
    }
}